package com.dependency.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
@DependsOn

public class Service1 {

    @Autowired
    Service2 service2;

    @Async
    public void f1(){
        System.out.println("Service1");
    }
}
